-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Box: support realtime event stream #222
Conversation
I can also split this PR up, if needed. |
@@ -224,7 +287,7 @@ describe('box nodes', function() { | |||
var onStub = sinon.stub(box, 'on').callsFake(function(event, cb) { | |||
var res = onFunction.apply(box, arguments); | |||
onStub.restore(); | |||
box.emit('input', {}); // trigger poll | |||
box.emit('check-events', {}); // trigger poll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it best to rename this event, because it's confusing. This is not a real input
event; the box in
Node has no inputs.
box/box.js
Outdated
return; | ||
} | ||
if (!(data.entries && data.entries.length)) { | ||
node.fail(new Error('Invalid response from Box')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, need i18n
still working out some kinks |
I'm going to withdraw this, as other changes I'm making supercede it. |
Proposed changes
box in
Node to monitor the event log via long polling instead of interval-based polling. This enables (roughly) real-time events to come down the pipe.BoxNodeIn
for DRYI could spend a lot longer with the tests. I'm also experiencing an unrelated test failure locally in the Instagram node.
Checklist
grunt
to verify the unit tests pass